package com.spzx.cart.api.factory;

import com.spzx.cart.api.RemoteCartService;
import com.spzx.common.core.exception.ServiceException;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class RemoteCartFallbackFactory implements FallbackFactory<RemoteCartService> {

    @Override
    public RemoteCartService create(Throwable cause) {
        throw new ServiceException(cause.getMessage());
    }
}
